package com.ys.nms.module.business.controller.admin.companyProperty.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.VO;
import com.ys.nms.module.business.dal.dataobject.devices.DevicesDO;
import com.ys.nms.module.business.dal.dataobject.localCompanyArea.CompanyAreaDO;
import com.ys.nms.module.business.dal.dataobject.localCompanyDevicetType.CompanyDeviceTypeDO;
import com.ys.nms.module.business.dal.dataobject.storage.StorageDO;
import com.ys.nms.module.business.libreApi.devices.req.DeviceAddRequest;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 资产 Response VO")
@Data
@ExcelIgnoreUnannotated
public class CompanyPropertyRespVO implements VO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23694")
    @ExcelProperty("id")
    private Integer id;

    @Schema(description = "IP地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @ExcelProperty("IP地址")
    private String hostName;

    @Schema(description = "名称", example = "芋艿")
    @ExcelProperty("名称")
    private String name;

    @Schema(description = "设备类型", example = "2")
    @ExcelProperty("设备类型")
    @Trans(type = TransType.SIMPLE ,target = CompanyDeviceTypeDO.class, fields = "name", ref = "deviceTypeName")
    private Long deviceType;

    @Schema(description = "设备类型", example = "2")
    @ExcelProperty("设备类型")
    private String deviceTypeName;

    @Schema(description = "业务类型", example = "1")
    @ExcelProperty("业务类型")
    private String businessType;

    @Schema(description = "区域")
    @Trans(type = TransType.SIMPLE ,target = CompanyAreaDO.class, fields = "name", ref = "areaName")
    private Long area;

    @Schema(description = "区域")
    @ExcelProperty("区域")
    private String areaName;

    @Schema(description = "厂商")
    @ExcelProperty("厂商")
    private String manufacturer;

    @Schema(description = "型号")
    @ExcelProperty("型号")
    private String model;

    @Schema(description = "序列号")
    @ExcelProperty("序列号")
    private String serial;

    @Schema(description = "生产日期")
    @ExcelProperty("生产日期")
    private LocalDate manufactureDate;

    @Schema(description = "质保到期日期")
    @ExcelProperty("质保到期日期")
    private LocalDate warrantyDate;

    @Schema(description = "设备分布位置")
    @ExcelProperty("设备分布位置")
    private String location;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "采集状态，1已采集", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private Integer collect;

    private DeviceAddRequest libreDevice;



    //cup利用率
    private Double cpuUsage;

    //内存利用率
    private Double  memUsage;

    private DevicesDO devices;

    //存储信息
    List<StorageDO> storageList;

    //24小时内的报警数
    private Integer alertDay;

    //报警总数
    private Integer alertTotal;


}
